package com.ssy.lingxi.transaction.api.feign;

import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.transaction.api.dto.request.InquiryProductPriceRequest;
import com.ssy.lingxi.transaction.api.dto.response.InquiryListProductResponse;
import com.ssy.lingxi.transaction.api.dto.response.InquiryProductPriceResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 交易服务
 */
@FeignClient(name = "transaction-service")
public interface ITradeFeign {
    /**
     * 通过报价单号查询询价单商品详情
     */
    @RequestMapping(value = "/transaction/feign/getInquiryProduct", method = RequestMethod.GET)
    Wrapper<List<InquiryListProductResponse>> getInquiryProduct(@RequestParam(name = "quotationNo") String quotationNo);

    /**
     * 通过商品skuId批量查询商品对应的供应商最后一次报价
     */
    @RequestMapping(value = "/transaction/feign/getInquiryProductPrice", method = RequestMethod.POST)
    Wrapper<List<InquiryProductPriceResponse>> getInquiryProductPrice(@RequestBody InquiryProductPriceRequest inquiryProductPriceRequest);
}
